package com.sangmo.fts.user.service;

import com.sangmo.boot.framework.plugin.dataview.crud.service.BaseViewService;
import com.sangmo.boot.framework.plugin.dataview.data.IDataViewRepo;
import com.sangmo.fts.user.model.Account;
import com.sangmo.fts.user.repo.AccountRepo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class AccountEntityService extends BaseViewService<Account> {

    @Autowired
    private AccountRepo accountRepo;

    @Override
    protected IDataViewRepo<Account> getRepo() {
        return accountRepo;
    }

    protected Account findByUserId(Long userId) {
        return accountRepo.findByUserId(userId);
    }
}
